/*
 * XML Type:  PaymentInstrument
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PaymentInstrument
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PaymentInstrument(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PaymentInstrumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.PaymentInstrument
{
    
    public PaymentInstrumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PMTINSTRUMENTTYPE$0 = 
        new javax.xml.namespace.QName("", "PMTINSTRUMENTTYPE");
    private static final javax.xml.namespace.QName BRAND$2 = 
        new javax.xml.namespace.QName("", "BRAND");
    
    
    /**
     * Gets the "PMTINSTRUMENTTYPE" element
     */
    public net.ofx.types.x2003.x04.PaymentInstrumentEnum.Enum getPMTINSTRUMENTTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PMTINSTRUMENTTYPE$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.PaymentInstrumentEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "PMTINSTRUMENTTYPE" element
     */
    public net.ofx.types.x2003.x04.PaymentInstrumentEnum xgetPMTINSTRUMENTTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInstrumentEnum target = null;
            target = (net.ofx.types.x2003.x04.PaymentInstrumentEnum)get_store().find_element_user(PMTINSTRUMENTTYPE$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "PMTINSTRUMENTTYPE" element
     */
    public void setPMTINSTRUMENTTYPE(net.ofx.types.x2003.x04.PaymentInstrumentEnum.Enum pmtinstrumenttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PMTINSTRUMENTTYPE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PMTINSTRUMENTTYPE$0);
            }
            target.setEnumValue(pmtinstrumenttype);
        }
    }
    
    /**
     * Sets (as xml) the "PMTINSTRUMENTTYPE" element
     */
    public void xsetPMTINSTRUMENTTYPE(net.ofx.types.x2003.x04.PaymentInstrumentEnum pmtinstrumenttype)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInstrumentEnum target = null;
            target = (net.ofx.types.x2003.x04.PaymentInstrumentEnum)get_store().find_element_user(PMTINSTRUMENTTYPE$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentInstrumentEnum)get_store().add_element_user(PMTINSTRUMENTTYPE$0);
            }
            target.set(pmtinstrumenttype);
        }
    }
    
    /**
     * Gets the "BRAND" element
     */
    public java.lang.String getBRAND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BRAND$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "BRAND" element
     */
    public net.ofx.types.x2003.x04.GenericNameType xgetBRAND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(BRAND$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "BRAND" element
     */
    public boolean isSetBRAND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(BRAND$2) != 0;
        }
    }
    
    /**
     * Sets the "BRAND" element
     */
    public void setBRAND(java.lang.String brand)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(BRAND$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(BRAND$2);
            }
            target.setStringValue(brand);
        }
    }
    
    /**
     * Sets (as xml) the "BRAND" element
     */
    public void xsetBRAND(net.ofx.types.x2003.x04.GenericNameType brand)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.GenericNameType target = null;
            target = (net.ofx.types.x2003.x04.GenericNameType)get_store().find_element_user(BRAND$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.GenericNameType)get_store().add_element_user(BRAND$2);
            }
            target.set(brand);
        }
    }
    
    /**
     * Unsets the "BRAND" element
     */
    public void unsetBRAND()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(BRAND$2, 0);
        }
    }
}
